/*
 * Etat.java
 *
 * Created on 16 avril 2007, 20:51
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package Entity;

import java.io.Serializable;
import java.util.Collection;
import java.util.Vector;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;

/**
 * Entity class Etat
 * 
 * @author amo-yas
 */
@Entity
public class Etat extends Entreprise implements Serializable {

    private double indemniteChomage;
    private double tauxImpositionEnt;
    private double tauxImpositionSal;
    private double montantEmprunt;
    @OneToMany(fetch=FetchType.EAGER)
    protected Collection <Landien> sesChomeurs;
    /** Creates a new instance of Etat */
    public Etat() {
    }
    
    /**
     * Gets the id of this Etat.
     * @return the id
     */
     public Etat(/*int id,*/ double capital_Entreprise, String nom_Entreprise, double remuneration_Entreprise,
             double indemniteChomage,double tauxImpositionEnt,double tauxImpositionSal,double montantEmprunt)
    {
        super( /*id,*/  capital_Entreprise,  nom_Entreprise,  remuneration_Entreprise);
        this.indemniteChomage= indemniteChomage;
        this.tauxImpositionEnt=tauxImpositionEnt;
        this.tauxImpositionSal=tauxImpositionSal;
        this.montantEmprunt= montantEmprunt;
        sesChomeurs= new Vector<Landien>();
        /*dureePropose=dureeP*/
    }
    public double getIndemniteChomage() {
        return indemniteChomage;
    }

    public void setIndemniteChomage(double indemniteChomage) {
        this.indemniteChomage = indemniteChomage;
    }

    public double getTauxImpositionEnt() {
        return tauxImpositionEnt;
    }

    public void setTauxImpositionEnt(double tauxImpositionEnt) {
        this.tauxImpositionEnt = tauxImpositionEnt;
    }

    public double getTauxImpositionSal() {
        return tauxImpositionSal;
    }

    public void setTauxImpositionSal(double tauxImpositionSal) {
        this.tauxImpositionSal = tauxImpositionSal;
    }

    public double getMontantEmprunt() {
        return montantEmprunt;
    }

    public void setMontantEmprunt(double montantEmprunt) {
        this.montantEmprunt = montantEmprunt;
    }

    public Collection<Landien> getSesChomeurs() {
        return sesChomeurs;
    }

    public void setSesChomeurs(Collection<Landien> sesChomeurs) {
        this.sesChomeurs = sesChomeurs;
    }
     public void addChomeur(Landien l){
        sesChomeurs.add(l);
    }
    
    public void removeChomeur(int i){
       Vector<Landien> vl =(Vector)sesChomeurs; 
       Landien l = vl.get(i);
       sesChomeurs.remove(l);

  
    }
       
}
